

function navegation(e, id, arg)

	-- debug session :-)
	if(arg ~= nil) then
		gui.alert('e '..e..' - id '..id..'- arg '..arg)
	else
		gui.alert('e '..e..' - id '..id)
	end -- end of runtime debug section :(


	-- ok lets a basic menu navegate...
	if(e == 21 and id == 1) then
		vtgui:ChoseTest()
	elseif(e== 21 and id == 2) then
		vtgui:lastResults()
	elseif(e == 21 and id == 3) then
		vtgui:resultSumary()
	elseif(e == 21 and id ==4) then
		vtgui:about()
	end

	
	-- the user chose a test in list at home screen
	if(e == 12 and id == 1800) then
		-- pass to chosedDict the value of arg
		chosedDict = arg
		-- go to start a game :)
		vtgui:testScreen()
	end


	-- if e==9, so the user are at testScreen
	if(e==9) then
		if(id==1806) then
			-- exit pressed
			vtgui:lastResults()

		elseif(id == 1802) then
			-- verify pressed
			ut:verify()

		elseif(id == 1803) then
			-- next pressed
			ut:getNewWord()

		elseif(id == 1804) then
			-- solve pressed
			ut:solve()

		elseif(id == 1805) then
			-- skip pressed
			ut:skip()
		end

	end

	

end




ut = {}

function ut:getTitles()
	num = table.getn(dicts)
	
	index=0
	for i=0,num do -- each table index
		for title in string.gfind(dicts[i], "(%S+-%S+)") do
			index = index +1			
			titles[index] = title
			-- print(title)
		end
	end
end

function ut:getNewWord()

	return "hause","casa"
end


function ut:verify()

	if(correctAnswer == gui.gettext(userText)) then
		gui.alert("OK! Correct!")
	else
		gui.alert("Error... wrong answer")
	end
end


function ut:solve()
	gui.alert(correctAnswer)
end



function ut:skip()

end
